package com.jeeplus.modules.work.queue.service;


import com.jeeplus.database.datasource.annotation.DS;
import com.jeeplus.modules.work.queue.mapper.GetQueueDataMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@DS("queuing")
@Service
@RequiredArgsConstructor
@Slf4j
@Transactional
public class GetQueueDataService {

    private final GetQueueDataMapper mapper;
    public int getYuyuTotal(String time){
        int yuyuTotal = mapper.getYuyuTotal(time);
        return yuyuTotal;
    }
    public int getLastYuyuTotal(String time){
        int yuyuTotal = mapper.getYuyuTotal(time);
        return yuyuTotal;
    }
    public List<Map<String,Object>> getAreaYuyuTotal(){
        List<Map<String, Object>> areaYuyuTotal = mapper.getAreaYuyuTotal();
        return areaYuyuTotal;
    }
}
